#!/usr/bin/env python3
"""
CampBattleView2D 主入口文件
"""

import sys
import os
from pathlib import Path

# 添加src目录到Python路径
current_dir = Path(__file__).parent
src_dir = current_dir / "src"
sys.path.insert(0, str(src_dir))

def main():
    """主函数"""
    try:
        from camp_battle.core.game import Game
        
        print("🎮 启动 CampBattleView2D")
        game = Game()
        game.run()
        
    except ImportError as e:
        print(f"❌ 导入错误: {e}")
        print("请确保项目结构正确且已安装所有依赖")
        sys.exit(1)
    except Exception as e:
        print(f"❌ 运行错误: {e}")
        import traceback
        traceback.print_exc()
        sys.exit(1)

if __name__ == "__main__":
    main()
